package com._58city.spark.app.mr;

import java.io.Serializable;
import java.util.List;

import org.apache.spark.streaming.api.java.JavaDStream;
import org.apache.spark.streaming.api.java.JavaPairDStream;

import com._58city.spark.consumer.kafka.MessageAndMetadata;

public interface MrKafkaInterface2<K, V> extends Serializable{
	
	 /**
     * map方法
     * @param kafkaStreams
     * @return
     */
    public List<JavaPairDStream<K, V>> mapPair(List<JavaDStream<MessageAndMetadata>> kafkaStreams);	
    
    /**
     * reduce方法
     * @param mapStream
     * @return
     */
    public JavaPairDStream<K, V> reducePair(JavaPairDStream<K, V> mapStream);
	
	/**
	 * 输出方法
	 * @param reduceStream
	 */
	public void foreachRDD(JavaPairDStream<K, V> reduceStream);
	
}
